package com.itheima.clientAndService01;

import java.math.BigDecimal;

public class BigDecimalClass {
    public static void main(String[] args) {
        BigDecimal bd1 = new BigDecimal("10");
        BigDecimal bd2 = new BigDecimal("3");
        BigDecimal result1 = bd1.add(bd2);
        BigDecimal result2 = bd1.subtract(bd2);
        BigDecimal result3 = bd1.multiply(bd2);
        BigDecimal result4 = bd1.divide(bd2, 3, BigDecimal.ROUND_HALF_UP);
        System.out.println(result1);
        System.out.println(result2);
        System.out.println(result3);
        System.out.println(result4);
    }
}
